package com.bwie.netty.handler;

import com.bwie.netty.domain.Result;
import com.bwie.netty.domain.pojo.Command;
import com.bwie.netty.server.IMServer;
import io.netty.channel.ChannelHandlerContext;

/**
 * 云计算-维度健康-08-在线接诊
 */
public class ConnectionHandler {
    public static void execute(ChannelHandlerContext ctx, Command command){

        IMServer.USERS.put(command.getNickname(), ctx.channel());

        ctx.channel().writeAndFlush(Result.success("与服务端连接建立成功"));
    }
}
